home *** CD-ROM | disk | FTP | other *** search
/ PC Advisor 2000 October / Encyclopedia Britannica CD Multimedia Edition - Ecosystems.iso / Britannica / Ecosystem / MOUNTAIN / NAVBAR.JS < prev    next >
Text File  |  1999-03-05  |  10KB  |  188 lines

  1. //<!--
  2. var TableOffset;
  3. var tID1, tID2, tID3;
  4. var Quick=0;
  5. NavBar = new Array(6);
  6. for (i=0; i<6; i++) { NavBar[i] = new Array(5); }
  7. NavBar[0][0] = new Image(); NavBar[0][0].src = "../main/80bg.gif";
  8. NavBar[0][1] = new Image(); NavBar[0][1].src = "../main/80h.gif";
  9. NavBar[0][2] = new Image(); NavBar[0][2].src = "../main/80c.gif";
  10. NavBar[0][3] = "Go to the overview<br>of the ecosystem.";
  11. NavBar[0][4] = 20;
  12. NavBar[1][0] = new Image(); NavBar[1][0].src = "../main/57bg.gif";
  13. NavBar[1][1] = new Image(); NavBar[1][1].src = "../main/57h.gif";
  14. NavBar[1][2] = new Image(); NavBar[1][2].src = "../main/57c.gif";
  15. NavBar[1][3] = "Two different categories<br>of mountain ecosystems.";
  16. NavBar[1][4] = 100;
  17. NavBar[2][0] = new Image(); NavBar[2][0].src = "../main/86bg.gif";
  18. NavBar[2][1] = new Image(); NavBar[2][1].src = "../main/86h.gif";
  19. NavBar[2][2] = new Image(); NavBar[2][2].src = "../main/86c.gif";
  20. NavBar[2][3] = "The plants, animals, and other<br>biota of mountain ecosystems.";
  21. NavBar[2][4] = 157;
  22. NavBar[3][0] = new Image(); NavBar[3][0].src = "../main/102bg.gif";
  23. NavBar[3][1] = new Image(); NavBar[3][1].src = "../main/102h.gif";
  24. NavBar[3][2] = new Image(); NavBar[3][2].src = "../main/102c.gif";
  25. NavBar[3][3] = "How mountain organisms interact with each other and with their environment.";
  26. NavBar[3][4] = 243;
  27. NavBar[4][0] = new Image(); NavBar[4][0].src = "../main/99bg.gif";
  28. NavBar[4][1] = new Image(); NavBar[4][1].src = "../main/99h.gif";
  29. NavBar[4][2] = new Image(); NavBar[4][2].src = "../main/99c.gif";
  30. NavBar[4][3] = "Where mountain ecosystems occur<br>throughout the world.";
  31. NavBar[4][4] = 345;
  32. NavBar[5][0] = new Image(); NavBar[5][0].src = "../main/75bg.gif";
  33. NavBar[5][1] = new Image(); NavBar[5][1].src = "../main/75h.gif";
  34. NavBar[5][2] = new Image(); NavBar[5][2].src = "../main/75c.gif";
  35. NavBar[5][3] = "In-depth discussion<br>of mountain ecosystems.";
  36. NavBar[5][4] = 444;
  37.  
  38. function InitNavbar(index) {
  39.   for (i=0; i<document.all.length; i++) {
  40.     if (document.all[i].tagName=="TD") { break; }
  41.   }
  42.   TableOffset=i+1;
  43.   document.all["frmNavDrop"].NavDrop.selectedIndex = index;
  44.   document.all["protect"].style.visibility = "hidden";
  45. }
  46.  
  47. function NavIn(object,index) {
  48.   clearTimeout(tID3);
  49.   object.style.color = "#FFFF00";
  50.   object.background = NavBar[index][1].src;
  51.   document.all["NavTip"].innerHTML = "<P CLASS='navtip'>"+NavBar[index][3]+"</P>";
  52.   document.all["NavTipback"].innerHTML = "<P CLASS='navtip'>"+NavBar[index][3]+"</P>";
  53.   document.all["NavTip"].style.left = NavBar[index][4];
  54.   document.all["NavTipback"].style.left = NavBar[index][4];
  55.   if (Quick==1) { ShowNavTip(); }
  56.   else { tID1 = setTimeout("ShowNavTip()",750); }
  57. }
  58. function ShowNavTip() {
  59.   Quick=1;
  60.   document.all["NavTip"].style.visibility = "visible";
  61.   document.all["NavTipback"].style.visibility = "visible";
  62.   tID2 = setTimeout("ClearNavTip()",3500);
  63. }
  64. function ClearNavTip() {
  65.   Quick=0;
  66.   document.all["NavTip"].style.visibility = "hidden";
  67.   document.all["NavTipback"].style.visibility = "hidden";
  68. }
  69. function NavOut(object,index) {
  70.   clearTimeout(tID1); clearTimeout(tID2);
  71.   if (Quick==1) { tID3 = setTimeout("Quick=0;",150); }
  72.   object.color = "#00A9DA";
  73.   object.background = NavBar[index][0].src;
  74.   object.style.color = "#00A9DA";
  75.   document.all["NavTip"].style.visibility = "hidden";
  76.   document.all["NavTipback"].style.visibility = "hidden";
  77. }
  78.  
  79. function NavNavigate(location) {
  80.   document.location.href=location;
  81. }
  82.  
  83. function OverviewMenuSelect(f) {
  84.   switch (f.NavDrop.selectedIndex) {
  85.     case 1:  document.location.href="../boreal/overview.htm"; break;
  86.     case 2:  document.location.href="../desert/overview.htm"; break;
  87.     case 3:  document.location.href="../freshwater/overview.htm"; break;
  88.     case 4:  document.location.href="../grassland/overview.htm"; break;
  89.     case 5:  document.location.href="../marine/overview.htm"; break;
  90.     case 6:  document.location.href="../mountain/overview.htm"; break;
  91.     case 7:  document.location.href="../polar/overview.htm"; break;
  92.     case 8:  document.location.href="../savanna/overview.htm"; break;
  93.     case 9:  document.location.href="../scrubland/overview.htm"; break;
  94.     case 10: document.location.href="../temperate/overview.htm"; break;
  95.     case 11: document.location.href="../tropical/overview.htm"; break;
  96.   }
  97. }
  98. function TypesMenuSelect(f) {
  99.   switch (f.NavDrop.selectedIndex) {
  100.     case 1:  document.location.href="../boreal/types.htm"; break;
  101.     case 2:  document.location.href="../desert/types.htm"; break;
  102.     case 3:  document.location.href="../freshwater/types.htm"; break;
  103.     case 4:  document.location.href="../grassland/types.htm"; break;
  104.     case 5:  document.location.href="../marine/types.htm"; break;
  105.     case 6:  document.location.href="../mountain/types.htm"; break;
  106.     case 7:  document.location.href="../polar/types.htm"; break;
  107.     case 8:  document.location.href="../savanna/types.htm"; break;
  108.     case 9:  document.location.href="../scrubland/types.htm"; break;
  109.     case 10: document.location.href="../temperate/types.htm"; break;
  110.     case 11: document.location.href="../tropical/types.htm"; break;
  111.   }
  112. }
  113. function OrganismsMenuSelect(f) {
  114.   switch (f.NavDrop.selectedIndex) {
  115.     case 1:  document.location.href="../boreal/organisms.htm"; break;
  116.     case 2:  document.location.href="../desert/organisms.htm"; break;
  117.     case 3:  document.location.href="../freshwater/organisms.htm"; break;
  118.     case 4:  document.location.href="../grassland/organisms.htm"; break;
  119.     case 5:  document.location.href="../marine/organisms.htm"; break;
  120.     case 6:  document.location.href="../mountain/organisms.htm"; break;
  121.     case 7:  document.location.href="../polar/organisms.htm"; break;
  122.     case 8:  document.location.href="../savanna/organisms.htm"; break;
  123.     case 9:  document.location.href="../scrubland/organisms.htm"; break;
  124.     case 10: document.location.href="../temperate/organisms.htm"; break;
  125.     case 11: document.location.href="../tropical/organisms.htm"; break;
  126.   }
  127. }
  128. function InteractionsMenuSelect(f) {
  129.   switch (f.NavDrop.selectedIndex) {
  130.     case 1:  document.location.href="../boreal/interactions.htm"; break;
  131.     case 2:  document.location.href="../desert/interactions.htm"; break;
  132.     case 3:  document.location.href="../freshwater/interactions.htm"; break;
  133.     case 4:  document.location.href="../grassland/interactions.htm"; break;
  134.     case 5:  document.location.href="../marine/interactions.htm"; break;
  135.     case 6:  document.location.href="../mountain/interactions.htm"; break;
  136.     case 7:  document.location.href="../polar/interactions.htm"; break;
  137.     case 8:  document.location.href="../savanna/interactions.htm"; break;
  138.     case 9:  document.location.href="../scrubland/interactions.htm"; break;
  139.     case 10: document.location.href="../temperate/interactions.htm"; break;
  140.     case 11: document.location.href="../tropical/interactions.htm"; break;
  141.   }
  142. }
  143. function DistributionMenuSelect(f) {
  144.   switch (f.NavDrop.selectedIndex) {
  145.     case 1:  document.location.href="../boreal/distribution.htm"; break;
  146.     case 2:  document.location.href="../desert/distribution.htm"; break;
  147.     case 3:  document.location.href="../freshwater/distribution.htm"; break;
  148.     case 4:  document.location.href="../grassland/distribution.htm"; break;
  149.     case 5:  document.location.href="../marine/distribution.htm"; break;
  150.     case 6:  document.location.href="../mountain/distribution.htm"; break;
  151.     case 7:  document.location.href="../polar/distribution.htm"; break;
  152.     case 8:  document.location.href="../savanna/distribution.htm"; break;
  153.     case 9:  document.location.href="../scrubland/distribution.htm"; break;
  154.     case 10: document.location.href="../temperate/distribution.htm"; break;
  155.     case 11: document.location.href="../tropical/distribution.htm"; break;
  156.   }
  157. }
  158. function ArticlesMenuSelect(f) {
  159.   switch (f.NavDrop.selectedIndex) {
  160.     case 1:  document.location.href="../boreal/articles.htm"; break;
  161.     case 2:  document.location.href="../desert/articles.htm"; break;
  162.     case 3:  document.location.href="../freshwater/articles.htm"; break;
  163.     case 4:  document.location.href="../grassland/articles.htm"; break;
  164.     case 5:  document.location.href="../marine/articles.htm"; break;
  165.     case 6:  document.location.href="../mountain/articles.htm"; break;
  166.     case 7:  document.location.href="../polar/articles.htm"; break;
  167.     case 8:  document.location.href="../savanna/articles.htm"; break;
  168.     case 9:  document.location.href="../scrubland/articles.htm"; break;
  169.     case 10: document.location.href="../temperate/articles.htm"; break;
  170.     case 11: document.location.href="../tropical/articles.htm"; break;
  171.   }
  172. }
  173. function HomeMenuSelect(f) {
  174.   switch (f.NavDrop.selectedIndex) {
  175.     case 1:  document.location.href="boreal/overview.htm"; break;
  176.     case 2:  document.location.href="desert/overview.htm"; break;
  177.     case 3:  document.location.href="freshwater/overview.htm"; break;
  178.     case 4:  document.location.href="grassland/overview.htm"; break;
  179.     case 5:  document.location.href="marine/overview.htm"; break;
  180.     case 6:  document.location.href="mountain/overview.htm"; break;
  181.     case 7:  document.location.href="polar/overview.htm"; break;
  182.     case 8:  document.location.href="savanna/overview.htm"; break;
  183.     case 9:  document.location.href="scrubland/overview.htm"; break;
  184.     case 10: document.location.href="temperate/overview.htm"; break;
  185.     case 11: document.location.href="tropical/overview.htm"; break;
  186.   }
  187. }
  188. //-->